<!DOCTYPE html>
<html>
<head>
	<title><?php echo isset($title)?$title:"";?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" content="designer:webzhu, date:2012-03-23" />
<link rel="stylesheet" href="<?php echo urldecode(Url::urlFormat("@static/css/base.css"));?>" />
<link rel="stylesheet" href="<?php echo urldecode(Url::urlFormat("@static/css/admin.css"));?>" />
<link rel="stylesheet" href="<?php echo urldecode(Url::urlFormat("@static/css/font_icon.css"));?>" />
<?php echo JS::import('jquery');?>
<script type="text/javascript" src="<?php echo urldecode(Url::urlFormat("@static/js/common.js"));?>"></script>
<!--[if lte IE 7]><script src="<?php echo urldecode(Url::urlFormat("@static/css/fonts/lte-ie7.js"));?>"></script><![endif]-->
</head>
<body style="background: none;">
    <?php echo JS::import('dialog?skin=brief');?>
<?php echo JS::import('dialogtools');?>
<?php echo JS::import('form');?>
<div id="card_box" style="width:600px;">
    <h2 class="page_title tc" style="border:none">店铺信息</h2>
    <div class="form2">
        <form  id="export_form" action="<?php echo urldecode(Url::urlFormat("/customer/dp_act"));?>" method="post" callback="create_voucher" enctype="multipart/form-data">
        <!--<input type="hidden" name="sq_id" value="<?php echo isset($dp['sq_id'])?$dp['sq_id']:"";?>">-->
        <input type="hidden" name="user_id" value="<?php echo isset($id)?$id:"";?>">
        <table class="default mt10" style="border-left:0;border-right:0;">
            <tr>
                <th style="width:100px">店铺名称：</th>
                <td><input  type="text" id ="dp_name" name="dp_name" ><i  style="color:red;" id ="dp_message"></i></td>
            </tr>
            <tr>
             <tr>
            <th>固定电话：</th>

            <td> <input type="text" pattern = "(\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$" name="dp_tel" ></td>
             </tr>

            <tr>
                <th>店铺图片</th>
                <td><input  pattern="required"   type="file" name="dp_logo" ></td>
            </tr>
            <!--<tr><th>机构代码：</th> <td><?php echo isset($dp['dp_dm'])?$dp['dp_dm']:"";?></td></tr>-->
            <!--<tr><th>所属行业：</th> <td><?php echo Zyk_tj::zyk_info('goods_category',$dp['category_id'],'name');?></td></tr>-->
            <!--<tr><th>所在地区：</th> <td><?php echo Zyk_tj::zyk_info('area',$dp['province'],'name');?> - <?php echo Zyk_tj::zyk_info('area',$dp['city'],'name');?> - <?php echo Zyk_tj::zyk_info('area',$dp['county'],'name');?></td></tr>-->
            <!--<tr><th>详细地址：</th> <td><?php echo isset($dp['dp_addr'])?$dp['dp_addr']:"";?></td></tr>-->

            <!--<tr>-->
            	<!--<th>营业执照</th>-->
            	<!--<td><img src="<?php echo isset($dp['dp_pic'])?$dp['dp_pic']:"";?>" style="width:300px;height:180px;"/></td>-->
            <!--</tr>-->
            <!-- <tr>
                <th>处理结果：</th> <td colspan="3"><input type="radio" checked="checked" name="status" value="1" ><label>同意</label> <input type="radio" name="status" value="2" ><label>拒绝</label> <label  class="red">(注:拒绝后，账户余额自动扣除。)</label></td>
            </tr>
            <tr>
                <th>处理意见：</th> <td colspan="3"><textarea name="re_note"></textarea></td>
            </tr> -->
        </table>
        <div class="tc mt10"><button class="button">通过</button></div>
        </form>
    </div>
</div>
<script type="text/javascript">
    $(function () {
        $("#dp_name").blur(function () {

            $("#dp_message").text("");
            $("#dp_name").css("border","solid 1px #FFFFFF");

            var dp_name = $("#dp_name").val();

            $.get("<?php echo urldecode(Url::urlFormat("/customer/dp_name_ref"));?>",{dp_name:dp_name},function(data){
                                                //如果返回是个数组,为什么 data['status'] 不显示值
                var json = eval(data);
                if(json == 'error1'){               //店铺名不能为空
                    $("#dp_message").text("店铺名不能为空");
                    $("#dp_name").css("border","solid 1px  red");

                }
                if(json == "error2")               //店铺名重复
                {
                    $("#dp_message").text("店铺名已经存在");
                    $("#dp_name").css("border","solid 1px  red");
                }
            });
        });




    });
</script>
</body>
</html>
<!--Powered by TinyRise-->